FROM swr.cn-north-4.myhuaweicloud.com/ooops/golang:1.18.10 as builder

WORKDIR /app

COPY . .

ENV GOPROXY https://goproxy.cn

RUN CGO_ENABLED=0 GOOS=linux go build -o ingress-controller-demo main.go

FROM swr.cn-north-4.myhuaweicloud.com/ooops/alpine:3.20

WORKDIR /app

COPY --from=builder /app/ingress-controller-demo .

CMD ["./ingress-controller-demo"]